The present invention relates to a method and an apparatus for adaptive intra prediction mode encoding, and a decoding method and apparatus for the same, and more particularly, to a method and an apparatus that may increase compression efficiency of intra prediction mode encoding and decoding.
In order to encode an image, an image compression scheme such as an H.264/advanced video coding (AVC) scheme may divide a single picture into a plurality of macro blocks and may encode each macro block using intra prediction.
Intra prediction calculates a prediction value of a current block desired to be encoded by referring to a pixel value that is spatially adjacent to a target block desired to be encoded within a current picture and then encodes the current block by performing discrete cosine transform (DCT) and quantization with respect to a difference between the prediction value and a pixel value of the current block. Here, a variety of intra prediction modes are present to predict the pixel value of the current block and are generally divided into a (4×4) intra prediction mode, an (8×8) intra prediction mode, and a (16×16) intra prediction mode of a luminance component, and an intra prediction mode of a chrominance component. The (4×4) intra prediction mode of the H.264/AVC scheme may have nine prediction modes for intra prediction.
The nine intra prediction modes have mode numbers of “0” to “8”, respectively, based on a statistical usage frequency. Usually, a number “0” mode has the largest statistical usage frequency and a number “8” mode has the lowest statistical usage frequency.
FIG. 1 is a conceptual diagram illustrating positions of a current block and a neighbor block.
Referring to FIG. 1, in the H.264/AVC scheme, information about an intra prediction direction of a current block 100 is encoded by referring to an intra prediction direction of an upper block 101 positioned above the current block 100 and an intra prediction direction of a left block 103 positioned on the left side of the current block 100. An operation of encoding the upper block 101 and the left block 103 may be completed prior to an operation of encoding the current block 100 whereby each of the upper block 101 and the left block 103 may have information about the intra prediction direction. Decoding may be completed prior to an operation of decoding the current block and thus, a reception side may refer to information about the intra prediction direction.
Initially, an intra prediction mode number of the current block 100 is determined based on rate-distortion (RD) cost. Next, a minimum value between intra prediction mode numbers of the upper block 101 and the left block 103 is defined as a candidate prediction mode (most probable mode (MPM)) and is compared with the intra prediction mode number of the current block 100. Since a number of “0” to “8” is allocated to the intra prediction mode number based on the statistical usage frequency, a probability that the minimum value among intra prediction mode numbers of neighbor blocks matches the intra prediction mode number of the current block is high.
An image compression scheme such as a high efficiency video coding (HEVC) scheme determines an intra prediction mode of a current block using 35 intra prediction modes and two MPMs, which is different from the H.264/AVC scheme that uses nine intra prediction modes and a single MPM.
FIG. 2 is an exemplary diagram of 35 intra prediction modes of the HEVC scheme.
Initially, the HEVC scheme determines an intra prediction mode number of the current block 100 among 35 intra prediction modes of FIG. 2 based on RD cost, which is similar to the H.264/AVC scheme, and defines the minimum value among intra prediction mode numbers of the upper block 101 and the left block 103 as a lower index of MPM, that is, MPM[0] and a maximum value as an upper index of MPM, that is, MPM[1]. Next, the above MPM[0] and MPM[1] are compared with an intra prediction mode number of the current block. A number of “0” to “34”, starting from a high frequency number, is allocated to the intra prediction mode number based on a statistical usage frequency.
Referring again to FIG. 1, in the intra prediction mode of the HEVC scheme, two MPMs are defined to have the minimum value and the maximum value among the intra prediction mode numbers using the upper block 101 and the left block 103. Therefore, only global statistics are considered and local statistics are not considered.